home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr31 / lhtools.zip / LHTOOLS.DOC < prev    next >
Text File  |  1993-05-17  |  7KB  |  176 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                     DOCUMENTATION
  12.  
  13.                                          FOR
  14.  
  15.                       CHKLHARC version 1.2 & MKLHARC version 1.0
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                      (c) Copyright 1989 by PAL Software NY, Inc.
  26.                                     51 Cedar Lane
  27.                                  Ossining, NY  10562
  28.                                   BBS:  914-762-8055
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.           All rights reserved.  These programs may be freely distributed
  45.           and used without the requirement of any payment to the author so
  46.           long as the programs are not modified in any form and no charge
  47.           is made for their distribution other than normal charges for disk
  48.           distribution or for BBS or other information service usage.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                                           1
  60.  
  61.           I.   CHKLHARC  (version 1.2)
  62.  
  63.           Purpose:  To "check" COM and EXE files for whether they are self-
  64.           extracting, self-executing LHARC files.  Usable as a prophylactic
  65.           measure against possible trojans.
  66.  
  67.           Usage:  CHKLHARC somefile.ext [/C]
  68.  
  69.           Discussion:    Valid extentions are: COM and EXE.  Normal wild-
  70.           cards (e.g. *.COM) will return the contents of all matches.  The
  71.           optional /C switch tells CHKLHARC to create a basic LZH type file
  72.           from the self-extracting file, readable with LHARC for safe
  73.           examination.
  74.  
  75.           This program writes to the standard output, so you can redirect
  76.           the output to a file with the normal DOS usage; e.g. "CHKLHARC
  77.           *.EXE > CHKFILE" will re-route all messages from the program to a
  78.           file called "CHKFILE".
  79.  
  80.           The purpose of this program is to search COM and EXE files to
  81.           determine if they are self-extracting LHARC files, and, if they
  82.           are, a determination is made whether the file contains an "AUTO-
  83.           LARC.BAT" file, which is potentially dangerous if you do not know
  84.           what it does.
  85.  
  86.           How can a LHARC file containing an "AUTOLARC.BAT" file be dange-
  87.           rous, you ask?  A LHARC self-extracting file, once it does its
  88.           self-extraction, will look for such a batch file and then execute
  89.           it if present.  A few "DEL *.COM" commands or the likes thereof
  90.           could do a good bit of mischief.
  91.  
  92.           Hence, I wrote CHKLHARC, which can examine any COM or EXE file
  93.           and determine first if it is a LHARC self-extracting file.  If it
  94.           is, it will then search for the presence of an AUTOLARC.BAT file
  95.           and warn you if one is found.
  96.  
  97.           My thanks to Basil Copeland and John Newlin for their work in
  98.           analyzing the LHARC format so that I could produce this program.
  99.  
  100.           History:  Version 1.2 release 4/19/89:
  101.  
  102.                *    Since MKLHARC is being simultaneously released, which
  103.                may result in more widespread use of self-extracting, self-
  104.                executing LHARC files, CHKLHARC no longer **automatically**
  105.                creates an LZH file from the sfx COM or EXE file.  A "/C"
  106.                switch has been added to force that creation.
  107.  
  108.                *    Minor modification to permit CHKLHARC to examine hidden
  109.                files such as IBM*.COM without bombing out.
  110.  
  111.                Version 1.1 release 4/07/89:  minor bug fix
  112.  
  113.                Version 1.0 release 4/06/89:  initial release
  114.  
  115.  
  116.  
  117.                                           2
  118.  
  119.           II.  MKLHARC  (version 1.0, initial release)
  120.  
  121.           Purpose:  To "make" a self-extracting, self-executing file using
  122.           LHARC.
  123.  
  124.           Usage:  MKLHARC somefile.ext  <== "ext" must be COM or EXE
  125.  
  126.           Discussion:  You must have LHARC.COM in your DOS path.  
  127.  
  128.                Any additional parameters that you place on the command line
  129.           after "somefile.ext" will be added to the AUTOLARC.BAT file.  For
  130.           instance, if your command is "MKLHARC WP RESUME", then when the
  131.           newly created file is invoked, it will wind up executing WordPer-
  132.           fect and loading your "RESUME" file for editing.
  133.  
  134.                LHARC is a free compression/extraction program with origins
  135.           in Japan.  One of its features is that it can create self-ex-
  136.           tracting files (as do many other U.S. competitors), but it's
  137.           special feature is that if one of the files which is extracted is
  138.           a batch file by the name of AUTOLARC.BAT, that batch file will be
  139.           executed at the conclusion of extraction.  MKLHARC was written to
  140.           take advantage of this feature.
  141.  
  142.                MKLHARC's operation is simple.  It takes your COM or EXE
  143.           file and invokes LHARC first to create a basic LZH file and then
  144.           to convert the LZH file to a self-executing COM or EXE file with
  145.           the same name as the original file.  
  146.  
  147.                Warning:  The original COM or EXE file apparently disappears
  148.           in this process as does any LZH file with the same basic file-
  149.           name.  Although a deleted LZH file will not be restorable, the
  150.           original COM or EXE file is, however, retrievable with CHKLHARC. 
  151.           Just run "CHKLHARC newfile.ext /C", and you'll get a basic LZH
  152.           file with the same filename.  You can then view the LZH file with
  153.           LHARC itself.  Lo and behold, you will find two files in there: 
  154.           AUTOLARC.BAT and another COM or EXE file whose name appears to be
  155.           gobbledygook (the filename is actually the same as the original
  156.           name, but with the letters shifted by one position).  Extract
  157.           that strange looking file, rename it to the original name, and
  158.           there you have your original file back.
  159.  
  160.                Use MKLHARC judiciously.  Since LHARC is relatively slow,
  161.           you would not want to use it on programs that you use very
  162.           frequently, unless you have a fast machine or don't mind the wait
  163.           for extraction.  Furthermore, since what you wind up with is a
  164.           batch file that executes, it is probably inappropriate to use
  165.           such a self-executing LHARC file within a batch file, unless your
  166.           operating system can handle nested batch commands.
  167.  
  168.           History:       Version 1.0 release 4/19/89:   initial release
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.                                           3
  176.